1
2
3
4 package joeq.ClassLib.Common.java.lang;
5
6 import joeq.Runtime.Unsafe;
7
8 /***
9 * Float
10 *
11 * @author John Whaley <jwhaley@alum.mit.edu>
12 * @version $Id: Float.java 1456 2004-03-09 22:01:46Z jwhaley $
13 */
14 abstract class Float {
15
16
17 public static int floatToIntBits(float value) {
18 if (java.lang.Float.isNaN(value)) return 0x7fc00000;
19 return Unsafe.floatToIntBits(value);
20 }
21 public static int floatToRawIntBits(float value) {
22 return Unsafe.floatToIntBits(value);
23 }
24 public static float intBitsToFloat(int bits) {
25 return Unsafe.intBitsToFloat(bits);
26 }
27
28 }